<template>
	<view class="money-content u-flex-column">
		<!-- 	<view class="" style="background-color: #fff;padding: 20rpx 10rpx;display: flex;background-color: #fd7400;width: 100%;">
			<u-search placeholder="" v-model="keyword" height="70" :showAction="false" searchIconSize="48"
				bgColor="#fff" @search="goSearch"></u-search>
			<u-icon name="list" size="48" color="#fff"></u-icon>
		</view> -->
		<!-- <view class="tabs">
			<u-tabs :current="tabIndex" :list="tabs" lineHeight="6rpx" lineColor="#fd7400"
				:inactiveStyle="{color: '#000'}" :activeStyle="{color: '#fd7400'}" @change="changeTab"></u-tabs>
		</view> -->
		<view class="nav-status text-orange">
			当前状态有{{count}}个物流
		</view>
		<scroll-view>
			<view class="card-list">
				<view class="card mt-5" v-for="item in Loglist" :key="item.id">
					<view class="top u-flex-between">
						<view class="left u-flex">
							<view class="text-info ">
								物流编号:{{item.documentNo}}
							</view>
						</view>
						<view class="status-blue-btn">
							{{item.logisticsStatus}}
						</view>
					</view>
					<view class="center">
						<view class="title u-flex-between">
							<view class="title-left text-orange">
								类型:{{item.receiptType}}
							</view>
						</view>
						<view class="text">
							收货人电话:{{item.receiptPhone}}
						</view>
						<view class="text mt-3">
							地址:{{item.address }}
						</view>
						<view class="text mt-3 pb-9">
							更新时间:{{item.updateTime }}
						</view>
						

					</view>
					<!-- <view class="down u-flex-content-end">
						<view class="right u-flex">
							<view class="cus-btn text-blue mr-5">
								配件费:{{item.spareFee}}
								<span style="color: red;">¥</span>
							</view>
							<view class="cus-btn text-blue mr-5">
								合计:{{item.workFee}}
								<span style="color: red;">¥</span>
							</view>
						</view>
					</view> -->
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabIndex: 0,
				count: '',
				
				params: {
					custAccId: '',
					type: "",
					company: "",
					pageNum: 1,
					pageSize: "10",
					startDate: "",
					endDate: "",
					logisticsNo: '',
					receiptPeople: "",
					singleNum:'',
					receiptPhone:''
				},
				custAccId:'',
				newParams: [],
				Loglist: [],
			};
		},
		onLoad() {
			this.params.custAccId = uni.getStorageSync('custAccid')
			this.getLogisticsList()
		},
		// 下拉刷新
		onPullDownRefresh() {
			this.getPullRefresh()
		},
		methods: {
			// 下拉刷新请求数据
			getPullRefresh(){
				console.clear()
				
				this.getLogisticsList()
				
			},
			async getLogisticsList() {
				const res = await uni.$api.logistics.getLogisticsList({
					...this.params,
				})
				this.Loglist = res.data
				this.count = res.count
				uni.stopPullDownRefresh()
			},
		},

	}
</script>

<style lang="scss">
	.money-content {
		// height: 100vh;
		background-color: $uni-bg-color-grey;

		.tabs {
			background-color: #fff;
			font-size: 28rpx;
			width: 100%;
		}

		.nav-status {
			height: 100rpx;
			line-height: 100rpx;
			text-align: center;
			font-size: 28rpx;
		}

		.card-list {
					background: $uni-bg-color-grey;
		padding: 0 28rpx;
					.card {
						padding: 28rpx 32rpx;
						background: #fff;
		border-radius: 10rpx;
						margin-bottom: 28rpx;
				.top {
					border-bottom: solid 1px #f5f5f5;
					padding-bottom: 10px;

					.left {
						.text-info {
							font-size: 28rpx;
						}
					}
				}

				.center {
					.title {
						padding-top: 18rpx;
						padding-bottom: 12rpx;

						.title-left {
							font-size: 28rpx;
						}

						.title-right {
							font-size: 28rpx;
						}
					}

					.text {
						font-size: 28rpx;
						color: gray;
					}
				}

				.down {
					border-top: solid 1px #f5f5f5;
					padding-top: 12px;
				}
			}
		}
	}
</style>